package com.hsp_java.Homework;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

@SuppressWarnings({"all"})
public class Homework03 {
    public static void main(String[] args) {
        Map map = new HashMap();

        map.put("jack" ,650);
        map.put("tom" ,1200);
        map.put("smith" ,2900);
        map.put("jack", 2600);

        Set key = map.keySet();
        for (Object o : key) {
            map.put(o, (Integer)map.get(o) + 100);
        }
        System.out.println(map);

        //遍历EntrySet
        Set entrySet = map.entrySet();
        for (Object entry : entrySet) {
            System.out.println( ((Map.Entry)entry).getKey() + " = " + ((Map.Entry)entry).getValue() );
        }

    }
}

class Person_ {
    private String name;
    private double price;



}